package com.weishu.core.service.impl;

import com.github.pagehelper.PageInfo;
import com.weishu.core.entity.CwPayOrder;
import com.weishu.core.mapper.CwPayOrderMapper;
import com.weishu.core.service.ICwPayOrderService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 * 支付订单表（支付流水信息） 服务实现类
 * </p>
 *
 * @author zgx
 * @since 2021-10-19
 */
@Service
public class CwPayOrderServiceImpl extends ServiceImpl<CwPayOrderMapper, CwPayOrder> implements ICwPayOrderService {

    @Resource
    private CwPayOrderMapper cwPayOrderMapper;

    /**
     * 交易流水查询
     * @param cwPayOrder 交易信息
     * @return
     */
    @Override
    public PageInfo<CwPayOrder> queryListorder(CwPayOrder cwPayOrder) {
        List<CwPayOrder> list = cwPayOrderMapper.queryListorder(cwPayOrder);
        PageInfo<CwPayOrder> pageInfo = new PageInfo<>(list);
        return pageInfo;
    }

    @Override
    public List<CwPayOrder> getList(CwPayOrder cwPayOrder) {
        List<CwPayOrder> list = cwPayOrderMapper.queryListorder(cwPayOrder);
        return list;
    }
}
